import request from '../utils/request'
export type listItem = { id: number; name: string }
// type channelsApi = {
//   data: {
//     channels: listItem[]
//   }
//   message: string
// }

// type ApiRes<T> = {
//   data: T
//   message: string
// }
// type channelsApi = ApiRes<{
//   channels: listItem[]
// }>

// export const channels = () => {
//   return request<channelsApi>({
//     url: '/v1_0/channels'
//   })
// }
export const channels = () => {
  return request<{
    channels: listItem[]
  }>({
    url: '/v1_0/channels'
  })
}
